<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Untitled Document</title>
    </head>
    <body>
        <h1>Select the service</h1>
        <table>
            <tr>
                <th>
                Id
                <th>
                    Myname
                </th>
                <th>
                    Price
                </th>
                <th>
                    Desc
                </th>
            </tr>
            <% @services.each do |service| %>
            <tr>
                <td>
                    <%=h service.id %>
                </td>
                <td>
                    <%=h service.myName %>
                </td>
                <td>
                    <%=h service.price %>
                </td>
                <td>
                    <%=h service.desc %>
                </td>
            </tr>
            <tr>
                <td>
                    <% form_for(@request) do |f| %>
                    <% f.error_messages %>
                    <table>
                    	 <tr>
                        	<td>
                            <%= f.label 'Current time:' %>
                            <%= f.select :date, [Date.today] %>
							</td>
                        </tr>
                        <tr>
                        	<td>
                            <%= f.label 'Accomodation Id:' %>
                            <%= f.select :accomodation_id, [@cookie_data] %>
							</td>
                        </tr>
                        <tr>
                        	<td>
                            <%= f.label 'Service Id:' %>
                            <%= f.select :service_id, [service.id] %>
							</td>
                        </tr>  
						<tr>
							<td>
								 <%= f.submit 'Request this service' %>
							</td>
						</tr>                     
                       
                    </table>
                    <% end %>
                </td>
            </tr>
            <% end %>
        </table>
        <% form_for(@request) do |f| %>
        <% end %>
    </body>
</html>
